
local skel=fk.CreateSkill {
    name = "study__shengwei",
  }

Fk:loadTranslationTable{
    ["study__shengwei"] = "神威",
    [":study__shengwei"] = "你造成伤害时，你可以弃置至多2张牌，使伤害增加你的弃牌数。",
    ["#shengwei-target"] = "神威：你可以弃置至多2张牌，使伤害增加你的弃牌数",
}
--
skel:addEffect(fk.DamageCaused , {
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill("study__shengwei") and target==player
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        local cards = room:askToCards(player, 
        {
            min_num = 0,
            max_num= 2,
            include_equip = false,
            skill_name = skel.name,
            prompt = "#shengwei-target",
            cancelable = true,

        })
        if  #cards > 0 then
          event:setCostData(self, {cards = cards})
          return true
        end
    end,
    on_use = function(self, event, target, player, data)
        local room=player.room
        local cards=event:getCostData(self).cards
        room:throwCard(cards,"study__shengwei",player,player)
        local n= #cards
        data:changeDamage(n)
    end,
})


return skel